package com.wangsd.web.sys.mapper;

import com.gitee.fastmybatis.core.mapper.CrudMapper;
import com.wangsd.web.sys.entity.SysPermission;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SysPermissionMapper extends CrudMapper<SysPermission, Long> {
    @Select("SELECT t.*,t2.menu_id FROM sys_permission t left join sys_button t2 on t.access_id = t2.id" +
            " where t.access_type = 2 and t.role_id = #{roleId}")
    List<SysPermission> selectByRoleId(Long roleId);
}
